
import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import LoginPage from './LoginPage.vue'
import TeacherSystem from './TeacherSystem.vue'
import StudentSystem from './StudentSystem.vue'
import RegiterPage from './RegiterPage.vue'
import AdminSystem from './AdminSystem.vue'
import TeacherIdentityInfo from './components/TeacherIdentityInfo.vue'
import StudentIdentityInfo from './components/StudentIdentityInfo.vue'

import MessageDetail from './components/MessageDetail.vue'
import PersonalInfo from './components/PersonalInfo.vue'
import ErrorPage from './components/ErrorPage.vue'
import DetailPage from './components/DetailPage.vue'

import AdminIdentityInfo from './components/AdminIdentityInfo.vue'
import ShowBiSheList from './components/student/ShowBiSheList.vue'
import StuMyBiShe from './components/student/StuMyBiShe.vue'
import UploadFile from './components/student/UploadFile.vue'

import AdminCheckPassed from './components/ShenHe/AdminCheckPassed.vue'
import AdminCheckPushBack from './components/ShenHe/AdminCheckPushBack.vue'
import AdminCheckWaitPass from './components/ShenHe/AdminCheckWaitPass.vue'
import SendMessage from './components/Message/SendMessage.vue'
import OpenTime from './components/Message/OpenTime.vue'

import AddNewBiShe from './components/teacher/AddNewBiShe.vue'
import MyBiShe from './components/teacher/MyBiShe.vue'
import ChooseStu from './components/teacher/ChooseStu.vue'
import ExamineOpeningSpeach from './components/teacher/ExamineOpeningSpeach.vue'
import ExamineFinalSpeach from './components/teacher/ExamineFinalSpeach.vue'

Vue.use(ElementUI);

Vue.use(VueRouter)

Vue.config.productionTip = false

const router = new VueRouter({
  routes:[
    { path:'/', name:'indexLogin', component:LoginPage},//Todo
    { path:'/register' ,name:'register', component:RegiterPage},
    { path:'/login', name:'login', component:LoginPage},

    { path: '/error' , name:'error' ,component:ErrorPage},
    { path:'/teacher/' ,name:'teacher', component:TeacherSystem,
      children:[
        {
          path: 'teacherInfo',
          component : TeacherIdentityInfo,
        },
        {
          path: 'addNew',
          component: AddNewBiShe,
        },
        {
          path: 'myBiShe',
          component:  MyBiShe
        },
        {
          path : 'chooseStu',
          component :ChooseStu
        },
        {
          path: 'ExamineOpeningSpeach',
          component: ExamineOpeningSpeach
        },
        {
          path: 'ExamineFinalSpeach',
          component: ExamineFinalSpeach
        },
        {
          path: 'personalInfo',
          component: PersonalInfo,
        },
        {
          path: 'message/:id',
          component : MessageDetail,
        },
      ]},
    { path:'/student/', name:'student' , component:StudentSystem
    ,children:[
      {
        path: 'bisheInfo',
        component : ShowBiSheList,
      },
      {
        path: 'message/:id',
        component : MessageDetail,
      },
      {
        path: 'bisheInfo/DetailPage/:bishe_id',
        component: DetailPage
      },
      {
        path: 'myBishe',
        component: StuMyBiShe,
      },
      {
        path: 'myBishe/DetailPage/:bishe_id',
        component: DetailPage
      },
      {
        path: 'upload',
        component: UploadFile
      },
      {
        path: 'personalInfo',
        component: PersonalInfo,
      },
    ]},
    { path:'/admin/', name:'admin' , component:AdminSystem
    ,children:[
      {
        path: 'teacherInfo',
        component : TeacherIdentityInfo,
      },
      {
        path: 'studentInfo',
        component: StudentIdentityInfo,
      },
      {
        path: 'bisheInfo',
        component: AdminIdentityInfo,
      },
      {
        path: 'personalInfo',
        component: PersonalInfo,
      },
      {
        path: 'message/:id',
        component : MessageDetail,
      },
      {
        path: 'AdminCheckPassed/passed/',
        component: AdminCheckPassed, 
      },
      {
        path: 'AdminCheckPassed/passed/DetailPage/:bishe_id',
        component : DetailPage
      },
      {
        path: 'AdminCheckPushBack/push_back/',
        component: AdminCheckPushBack, 
      },
      {
        path: 'AdminCheckPushBack/push_back/DetailPage/:bishe_id',
        component : DetailPage
      },
      {
        path: 'AdminCheckWaitPass/wait_pass/',
        component: AdminCheckWaitPass, 
        
      },
      {
        path: 'AdminCheckWaitPass/wait_pass/DetailPage/:bishe_id',
        component : DetailPage
      },
      {
        path: 'SendMessage',
        component: SendMessage
      },
      {
        path: 'setOpenTime',
        component:OpenTime
      }
      
    ]},
    
    
    
  ]
})

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
